import Movie from '@/views/Movie'
import NowPlaying from '@/components/NowPlaying'
import ComingSoon from '@/components/ComingSoon'
import City from '@/components/City'
import Search from '@/components/Search'
import Detail from '@/views/Movie/Detail'

export default {
  path: '/movie',
  component: Movie,
  children: [
    {
      path: 'city',
      component: City
    },
    {
      path: 'nowplaying',
      component: NowPlaying
    }, {
      path: 'comingsoon',
      component: ComingSoon
    }, {
      path: 'search',
      component: Search
    },
    {
      path: 'detail/1/:id',
      components: {
        default: NowPlaying,
        detail: Detail
      }
    },
    {
      path: 'detail/2/:id',
      components: {
        default: NowPlaying,
        detail: Detail
      }
    },
    {
      path: '',
      redirect: 'nowplaying'
    }
  ]
}